package com.google.gwt.livinglife.client;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author amitprakash
 * This class describes the query parameter for querying the list of challenges.
 * Fields that are let as NULL would be considered as empty conditions. If order is null
 * Any arbitrary set can be returned with no particular ordering
 */
public class ChallengeSelector implements Serializable {
	public enum SortOrder {
		TIME,
		LIKED,
		INSPIRED,
		NUM_RESPONSES,
		ARBITRARY
	}
	private Long group_id;
  private String user_id;
  private Date start_date;
  private Date end_date;
  private SortOrder order;
  
  // This is needed for pagination, the response will contain only a subset of query results
  // between start index ad end_index-1. 
  private int start_index = 0;
  private int end_index = 10;
  
 	public Long getGroup_id() {
		return group_id;
	}
	public void setGroup_id(Long groupId) {
		group_id = groupId;
	}
	public String getUser_id() {
		return user_id;
	}
	public void setUser_id(String userId) {
		user_id = userId;
	}
	public Date getStart_date() {
		return start_date;
	}
	public void setStart_date(Date startDate) {
		start_date = startDate;
	}
	public Date getEnd_date() {
		return end_date;
	}
	public void setEnd_date(Date endDate) {
		end_date = endDate;
	}
	public SortOrder getOrder() {
		return order;
	}
	public void setOrder(SortOrder order) {
		this.order = order;
	}
	public int getStart_index() {
		return start_index;
	}
	public void setStart_index(int startIndex) {
		start_index = startIndex;
	}
	public int getEnd_index() {
		return end_index;
	}
	public void setEnd_index(int endIndex) {
		end_index = endIndex;
	}
}
